<%@page import="java.util.List"%>
<%@page import="com.raul.prueba.biblioteca.servlets.vo.VOReserva"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Usuario</title>

<script>
function reservar() {
	var forma = document.getElementById("formaReserva");
	forma.action = "adminReserva.servlet";
	var accion = document.getElementById("accion");
	accion.value = "reserva";
	forma.submit();
}

</script>

</head>
<body onload="carga();">
<form action="" method="POST" id="formaReserva">
<center>


<input type="hidden" name="accion" id="accion">

	<h1 align="center">Reserva de Ejemplar</h1>
<table>
<tr>
<td style="font-weight: bold; size: 12px; color: blue;" align="right">ID : </td>
<td><input type="text" name="id" id="id"></td>
</tr>
<tr>
<td style="font-weight: bold; size: 12px; color: blue;" align="right">ISBN : </td>
<td><input type="text" name="isbn" id="isbn"></td>
</tr>
<tr>
<td style="font-weight: bold; size: 12px; color: blue;" align="right">Titulo : </td>
<td><input type="text" name="titulo" id="titulo"></td>
</tr>
<tr>
<td colspan="2">
<input type="button" value="Reservar" style="font-size: 14px; color: blue;"
onclick="reserva();">
</td>

</tr>
</table>

<table>
<tr>
<th>ID</th><th>ISBN</th><th>Titulo</th>
</tr>
<%
	List<VOReserva> listaR = (List<VOReserva>)session.getAttribute("listaReserva");
for(VOReserva obj: listaR) {
%>
	<tr>
	<td><%= obj.getISBN() %></td>
	<td><%= obj.getTitulo() %></td>
	<td><%= obj.getRealizarReserva() %></td>
	</tr>
<%	
}
%>
</table>
</form>

</center>
</body>
</html>
